public class code2 {
    public static int fac(int n){
        if(n==0||n==1)
            return 1;
        else
            return n*fac(n-1);
    }
    public static void main(String[] args) {
        for(int i=0;i<=6;i++){
            System.out.print(fac(i)+" ");
        }
    }
}
